
 /**
 * UserInfo.java.java.
 * User: BrianChen Date: 2012-6-5 下午03:43:46
 *
 * Copyright (c) 2009 Hewlett-Packard Development Company, L.P.
 * All rights reserved.
 */
package com.collapsar.core.security.model;

import java.util.Date;

import com.collapsar.core.orm.model.VersionalEntity;

/**
 * <pre>
 * REVISIONS: 
 * Version 	Date 		Author 			Description
 * ------------------------------------------------------------------- 
 * 1.0 		2012-6-5 	BrianChen 	1. Created this class. 
 * </pre>
 * 
 * @author BrianChen
 * @date 2012-6-5 下午03:43:46
 * @version 1.0
 * @see
 * 
 */
@SuppressWarnings("serial")
public class UserInfo extends VersionalEntity{
	private String userAccount = null;
	private String userPasswd = null;
	private String userName = null;
	private int userGender = 0;
	private Date userBirth = null;
	private String userDept = null;
	private String userDuty = null;
	private int userAuth = -1;
	private String userEmail = null;
	private String userAddr = null;
	private String userPhoto = null;
	private String userRemark = null;
	
	public UserInfo(){}
	
	public UserInfo(String userAccount, String userPasswd){
		this.userAccount = userAccount;
		this.userPasswd = userPasswd;
	}
	
	public UserInfo(String userAccount, String userPasswd, String userEmail){
		this.userAccount = userAccount;
		this.userPasswd = userPasswd;
		this.userEmail = userEmail;
	}
	
	public String getUserAccount() {
		return userAccount;
	}
	public void setUserAccount(String userAccount) {
		this.userAccount = userAccount;
	}
	public String getUserPasswd() {
		return userPasswd;
	}
	public void setUserPasswd(String userPasswd) {
		this.userPasswd = userPasswd;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public int getUserGender() {
		return userGender;
	}
	public void setUserGender(int userGender) {
		this.userGender = userGender;
	}
	
	public Date getUserBirth() {
		return userBirth;
	}

	public void setUserBirth(Date userBirth) {
		this.userBirth = userBirth;
	}

	public String getUserDept() {
		return userDept;
	}
	public void setUserDept(String userDept) {
		this.userDept = userDept;
	}
	public String getUserDuty() {
		return userDuty;
	}
	public void setUserDuty(String userDuty) {
		this.userDuty = userDuty;
	}

	public int getUserAuth() {
		return userAuth;
	}

	public void setUserAuth(int userAuth) {
		this.userAuth = userAuth;
	}

	public String getUserEmail() {
		return userEmail;
	}
	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}
	public String getUserAddr() {
		return userAddr;
	}
	public void setUserAddr(String userAddr) {
		this.userAddr = userAddr;
	}
	
	public String getUserPhoto() {
		return userPhoto;
	}

	public void setUserPhoto(String userPhoto) {
		this.userPhoto = userPhoto;
	}

	public String getUserRemark() {
		return userRemark;
	}
	public void setUserRemark(String userRemark) {
		this.userRemark = userRemark;
	}
	@Override
	public int hashCode() {
		return this.userAccount.hashCode();
	}
	@Override
	public boolean equals(Object obj) {
		if(this == obj){
			return true;
		}
		if(!(obj instanceof UserInfo)){
			return false;
		}
		final UserInfo userInfo = (UserInfo)obj;
		if(!this.userAccount.equals(userInfo.getUserAccount())){
			return false;
		}
		return true;
	}
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("{userAccount=");
		sb.append(this.userAccount);
		sb.append(", userPasswd=");
		sb.append(this.userPasswd);
		sb.append(", userName=");
		sb.append(this.userName);
		sb.append(", userGender=");
		sb.append(this.userGender);
		sb.append(", userBirth=");
		sb.append(this.userBirth);
		sb.append(", userDept=");
		sb.append(this.userDept);
		sb.append(", userDuty=");
		sb.append(this.userDuty);
		sb.append(", userEmail=");
		sb.append(this.userEmail);
		sb.append(", userAddr=");
		sb.append(this.userAddr);
		sb.append(", userPhoto=");
		sb.append(this.userPhoto);
		sb.append(", userRemark=");
		sb.append(this.userRemark);
		sb.append("}");
		
		return sb.toString();
	}
	
	
	
}

